<div class="col-lg-12 wrapperbox">
    <form class="form-horizontal" role="form">
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">序号</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="num" placeholder="序号">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">单位名称</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbunitname" placeholder="单位名称">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">单位地址</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbaddress" placeholder="单位地址">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">联系人</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbcontact" placeholder="联系人">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">联系电话</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbtel" placeholder="联系电话">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">供货品类</label>
            <div class="col-sm-10">
                <select class="form-control" id="fenlei">
                    <option>猪肉</option>
                    <option>牛肉</option>
                    <option>白菜</option>
                    <option>蒜苗</option>
                    <option>小葱</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">结算户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbusername" placeholder="结算户名">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">结算银行</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbbank" placeholder="结算银行">
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">结算账号</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="tbbanknum" placeholder="结算账号">
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    //console.log(location.hash)
    //	window.onload = function () {}
    var str = location.hash.split("=")[1];
    // console.log("------",str)
    $.get("/stock/supplierdit", {
        str
    }, function (data) {
        $("#num").val(data.num);
        $("#tbunitname").val(data.supplier)
        $("#tbaddress").val(data.supplierid)
        $("#tbcontact").val(data.supname)
        $("#tbtel").val(data.tele)
        $("#fenlei").val(data.foodname)
        $("#tbusername").val(data.endname)
        $("#tbbank").val(data.endbank)
        $("#tbbanknum").val(data.endnumber)
    })
</script>